from django.contrib import admin
from user.models import *

class UserAdmin(admin.ModelAdmin):
    list_display = ('id','username','email','mobile',)
    # list_filter = ('source','consultant','date')      #过滤字段
    search_fields = ('username',)                     #搜索匹配字段

class RoleAdmin(admin.ModelAdmin):
    list_display = ('id','name','zh_name',)
    # list_filter = ('source','consultant','date')      #过滤字段
    search_fields = ('name',)                     #搜索匹配字段


admin.site.register(User, UserAdmin)
admin.site.register(Role, RoleAdmin)
admin.site.register(UserRole)
